package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.PubEmployeeMapper;
import com.ruoyi.bussiness.domain.PubEmployee;
import com.ruoyi.bussiness.service.IPubEmployeeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 从业人员Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class PubEmployeeServiceImpl implements IPubEmployeeService 
{
    @Autowired
    private PubEmployeeMapper pubEmployeeMapper;

    /**
     * 查询从业人员
     * 
     * @param id 从业人员主键
     * @return 从业人员
     */
    @Override
    public PubEmployee selectPubEmployeeById(Long id)
    {
        return pubEmployeeMapper.selectPubEmployeeById(id);
    }

    /**
     * 查询从业人员列表
     * 
     * @param pubEmployee 从业人员
     * @return 从业人员
     */
    @Override
    public List<PubEmployee> selectPubEmployeeList(PubEmployee pubEmployee)
    {
        return pubEmployeeMapper.selectPubEmployeeList(pubEmployee);
    }

    /**
     * 新增从业人员
     * 
     * @param pubEmployee 从业人员
     * @return 结果
     */
    @Override
    public int insertPubEmployee(PubEmployee pubEmployee)
    {
        return pubEmployeeMapper.insertPubEmployee(pubEmployee);
    }

    /**
     * 修改从业人员
     * 
     * @param pubEmployee 从业人员
     * @return 结果
     */
    @Override
    public int updatePubEmployee(PubEmployee pubEmployee)
    {
        return pubEmployeeMapper.updatePubEmployee(pubEmployee);
    }

    /**
     * 批量删除从业人员
     * 
     * @param ids 需要删除的从业人员主键
     * @return 结果
     */
    @Override
    public int deletePubEmployeeByIds(String ids)
    {
        return pubEmployeeMapper.deletePubEmployeeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除从业人员信息
     * 
     * @param id 从业人员主键
     * @return 结果
     */
    @Override
    public int deletePubEmployeeById(Long id)
    {
        return pubEmployeeMapper.deletePubEmployeeById(id);
    }
}
